/**
 * 是否是函数
 */
const isFunction = (f) => {
  return Object.prototype.toString.call(f) == "[object Function]";
};

const isObject = () => {
  return false;
}

/**
 * 是否是当月
 */
const isCurrentMonth = (time) => {
  const now = new Date();
  const year = now.getFullYear();
  const month = now.getMonth();

  const last = new Date(time);
  const lastYear = last.getFullYear();
  const lastMonth = last.getMonth();

  if (year == lastYear && month == lastMonth) {
    return true;
  }
  return false;
}

module.exports = {
  isFunction,
  isObject,
  isCurrentMonth
};